<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <title>亿品供应链商户平台商家端</title>
    <jsp:include page="include/header.jsp"></jsp:include>
     <style type="text/css">
			table td{
			text-align: center;
			}
		 	table th{
			text-align: center;
		 	}
		 	.wsd{
		 		width:50%;
		 	}
		 	.single-lines{
		 		padding: 6px 0px 6px 12px;
		 	}
		 	.tip th:NTH-OF-TYPE(2) {
	             color:#428bca;
             }
             .tip th:NTH-OF-TYPE(3) {
	            color: #c1c12b;
             }
             .tip th:NTH-OF-TYPE(4) {
	             color:#f9512c;
             }
	</style>
</head>
<body>
<div id="wrapper">

		<div class="row">
			<div class="col-lg-12">
				<h1 class="page-header">欢迎使用管理平台</h1>
			</div>
		</div>
		<div class="row">
			<div class="col-xs-12 col-md-12 col-lg-12">
				<div class="panel panel-default">
					<div class="panel-heading">统计信息</div>
					<div class="panel-body hint">
						<div class="col-xs-2 col-md-2 col-lg-2" >普通销售额 : <span class="label label-info" id="goodsCount"></span>${amount } </div>
						<div class="col-xs-2 col-md-2 col-lg-2">普通交易单数: <span class="label label-info" id="chart1State3"></span>${orderNum }</div>
						<div class="col-xs-2 col-md-2 col-lg-2" >团购销售额 : <span class="label label-info" id="goodsCount"></span>${amountgb } </div>
						<div class="col-xs-2 col-md-2 col-lg-2">团购交易单数: <span class="label label-info" id="chart1State3"></span>${orderNumgb }</div>
<%-- 						<div class="col-xs-2 col-md-2 col-lg-2">已兑总换量: <span class="label label-info" id="chart1State1"></span>${orderState2 }</div>
			    	<div class="col-xs-2 col-md-2 col-lg-2">未兑换总量: <span class="label label-info" id="chart1State2"></span>${orderState1 } </div>
 --%>					</div>
				</div>
			</div>
		</div>
			<div class=" panel panel-default">
					<table id="dataTable" class="table table-hover table-noellipsis table-bordered">
					
						<thead>
							<tr>	
								<th width="100px">日期</th>		               		
								<th width="120px">日普通销售额</th>
								<th width="120px">日普通有效订单数</th>
								<th width="120px">日团购销售额</th>
								<th width="120px">日团购有效订单数</th>
<!-- 								<th width="60px">日使用兑换码数</th>
								<th width="120px">日未使用兑换码</th>
 -->						</tr>
						</thead>
			            <tbody id="dataList"></tbody>
			        </table>
				</div>
		        <div class="row">
		        	<div class="col-lg-12">
		        		<ul id="dataPagination" class="pagination-sm pull-right"></ul>
		        	</div>
		        </div>
</div>
<jsp:include page="include/javascripts.jsp"></jsp:include>
<script type="text/html" id="dataTpl">
	{{each list as item}}
	<tr id="item{{item.id}}" data-id="{{item.id}}">
		<td>{{item.RepDate | dateFormat:'yyyy-MM-dd'}}</td>
		<td>{{item.amount}}</td>
	    <td>{{item.orderNum}}</td>
		<td>{{item.amountgb}}</td>
	    <td>{{item.orderNumgb}}</td>
	</tr>
	{{/each}}
</script>
<script type="text/javascript">
var dataPaginator;
$(query);
function query(){
	var params = {
		pageSize:10,
	};
	if(dataPaginator){
		dataPaginator.destroy();
	}
	dataPaginator = Kit.pagination("#dataPagination","${BASE_PATH}/page",params,function(result){
		//设置显示最新的数据数量
		$("#dataCount").html(result.object.totalRow);
		//根据模板渲染数据并填充
		$("#dataList").empty().append(template("dataTpl",result.object));
	});
	
}

</script>
</body>
</html>